import mx from 'mxgraph'

const mxgraph = mx({
  mxBasePath: '/mxgraph'
})
// decode bug https://github.com/jgraph/mxgraph/issues/49
window.MxGraph = mxgraph.mxGraph
window.mxGraphModel = mxgraph.mxGraphModel
window.mxEditor = mxgraph.mxEditor
window.mxGeometry = mxgraph.mxGeometry
window.mxDefaultKeyHandler = mxgraph.mxDefaultKeyHandler
window.mxDefaultPopupMenu = mxgraph.mxDefaultPopupMenu
window.mxStylesheet = mxgraph.mxStylesheet
window.mxDefaultToolbar = mxgraph.mxDefaultToolbar
//window.MxConstants = mxgraph.mxConstants
//window.MxEvent = mxgraph.mxEvent
Object.keys(mxgraph).forEach((key) => {
  window[key] = mxgraph[key]

})
export default mxgraph
